<?php
class Login_model extends Model {
	
	private $table 	= 'admin';
	private $sbradio;
	
	function Login_model() {
		parent::Model ();
	}
	
	
	function login_check( $us = '', $pw = '' ) {
		$data = array ();
		
		
		$query = $this->db->query("SELECT `id`, `name`, `pass`, `email` FROM `$this->table` WHERE `name` = '$us' AND `pass` = '$pw'  LIMIT 1 ");
		
		if ( $query->num_rows () > 0 ) 
			$data = $query->row_array();
		
		$query->free_result ();
		
		return $data;
	}	
	
	
}
?>